The invention relates generally to video graphics processing and more particularly to a method and apparatus for processing portions of primitives that are being rendered.
Computers are used in many applications. As computing systems continue to evolve, the graphical display requirements of the systems become increasingly demanding. This is especially true in the area of three-dimensional (3D) graphics processing. In order to process 3D graphics images, the position of graphics primitives with respect to the display must be understood in all three dimensions. This includes the dimension of depth, often referred to as the Z dimension. The Z dimension describes the positioning of a video graphics primitive with respect to other video graphics primitives within the display frame in terms of depth, or distance from the viewer, of the video graphics primitives.
Computer displays and other high resolution display devices such as high definition televisions (HDTVs), projectors, printers, plotters, and the like, present an image to the viewer as an array of individual picture elements, or pixels. The individual pixels are given a specific color, which corresponds to the color of the image at the location of the particular pixel. The pixels are closely spaced, and the viewers visual system performs a filtering of the individual colors to form a composite image. If the partitioning of the image into individual pixel elements is performed properly, and the pixels are close enough together, the viewer perceives the displayed array of pixels as a virtually continuous image.
In order to present a smooth and continuous image on the display, the processing entity processing the video graphics images must maintain a high rate of pixel processing. In many cases, graphics primitives that are received for rendering are often inconsequential as they are positioned behind other primitives or objects already drawn with respect to the display frame. In other words, the information contained within the graphics primitive is completely covered up from a viewer""s perspective by other graphics primitives as the Z dimension of the newly received primitive positions it behind those primitives already drawn. As such, the processing operations required for processing such inconsequential primitives may be unnecessary.
In some prior art systems, a number of hierarchical sets of Z values are stored for a display frame. For example, the rear most Z value for each half of the display may be stored in one set, the rear most value for each quarter in the next hierarchical set, the rear most value for each eighth in the next, etc. As such, primitives can be compared with successive hierarchical layers to determine if the primitive needs to be rendered. In such prior art systems, the front must portion of the primitive in question is compared with the rear most portion of each relevant hierarchical layer. If the primitive is determined to lie behind other primitives based on the hierarchical layer comparisons, the entire primitive may be discarded. If any portion of the primitive is determined to lie in a potentially visible position, the entire primitive is rendered. The full set of hierarchical layers, which may be stored as an octal tree, requires a large amount of overhead, and recomputation of the hierarchical layers after each primitive rendering operation requires additional processing bandwidth. In addition, by rendering or discarding entire primitives based on the comparison with the current state of the frame, if only a small portion of the primitive is potentially visible and therefore needs to be processed, processing of the remaining portions that are not potentially visible consumes processing resources unnecessarily.
Therefore, a need exists for a method and apparatus that allows primitives to be processed in a more efficient manner that avoids at least some unnecessary processing of non-visible primitive portions without the need for storing hierarchical sets of Z values.